<?php
	include_once('libs/htdu_core.php');
	$exec_mysql = new execute_mysql_query();
	@$cid = $_POST['cid'];
?>
<script type="text/javascript">
	function ajaxGetChid(id){
		$('#cid').html('<img src="img/ajax_loader.gif" />');
		$.ajax({
			url : 'ajax_get_id.php',
			type : 'POST',
			data : {
				id : id,
				idSelect : ''
			},
			success : function(data){
				$('#cid').html(data);
				adjustSize();
			},
			error : function(XMLHttpRequest, textStatus, errorThrown){
				$('#cid').html('<span style="color:red; font-style:italic">Lỗi lấy danh mục con, vui lòng thử lại sau</span>');
			}
		});
	}
</script>
<p class="group-line">
   <span class="group-title">Thông tin bài viết</span>
</p>
	<form name="loai" action="" method="post">
	Chọn danh mục tin:
	<select name="selLoai" id="selLoai" onchange="ajaxGetChid(this.value)">
		<option value="0" id="0">====================Tất cả====================</option>
	<?php
		$loai = $exec_mysql->execute("select * from node_type order by id asc",0);
		while($row = mysql_fetch_array($loai))
		{
			echo '<option value="'.$row['id'].'">'.$row['name'].'</option>';
		}
	?>
	</select>
	</form>
<div id="cid"></div>